import sun.rmi.runtime.Log;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;

/**
 * Learn Java from https://www.liaoxuefeng.com/
 * 
 * @author liaoxuefeng
 */

public class Main {

	public static void main(String[] args) {
		// TODO: 给Person类增加一个静态字段count和静态方法getCount，统计实例的个数
//		Person p1 = new Person("小明");
//		System.out.println(Person.getCount()); // 1
//		Person p2 = new Person("小红");
//		System.out.println(Person.getCount()); // 2
//		Person p3 = new Person("小军");
//		System.out.println(Person.getCount()); // 3
//		String str = new String("abc");
//		String s1 = "a,b,c,d";
//
//		String[] s2 = s1.split(",");
//		for (String s: s2
//			 ) {
//			System.out.println(s);
//		}

		 int a= -10;
		 //assert a>0:"x must > 0";


		byte tByte = 12;
		String tString = Integer.toBinaryString((tByte & 0xFF) + 0x100 ).substring(1);
//		Person person= new Person();
		System.out.println(tString);

		BigDecimal bigA=new BigDecimal(1);
		BigDecimal bigB=new BigDecimal(3);
		System.out.println("a/b="+bigA.divide(bigB,10, RoundingMode.HALF_UP));

		System.out.println(Math.random());
	}

}
